package com.ytz.controller;


import com.ytz.service.IWxPaymentService;
import com.ytz.vo.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/wx-pay")
public class WxPayController {

    @Autowired
    private IWxPaymentService iWxPaymentService;


    @PostMapping("/native/{orderNo}")
    public BaseResult nativePay(@PathVariable String orderNo) throws Exception {
        BaseResult baseResult = iWxPaymentService.nativePay(orderNo);
        return  baseResult;

    }
}
